#!/bin/bash -e

rm -rf ./dl-assets/
mkdir -p ./dl-assets/
pushd dl-assets/
wget https://obs-community-intl.obs.ap-southeast-1.myhuaweicloud.com/obsutil/current/obsutil_linux_amd64.tar.gz
tar xvf obsutil_linux_amd64.tar.gz
rm -vf obsutil_linux_amd64.tar.gz
chmod -R 700 obsutil_linux_amd64_5.4.11/
pushd obsutil_linux_amd64_5.4.11/
mv obsutil hcloud-obsutil
popd
popd
dpkg-buildpackage -us -uc
lintian ../huawei-cloud-obsutil_5.4.11~spark1_amd64.deb
